-- GENERATED SPELL FOR [Elder Kuruti] --


function spell0_18197(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(12058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18197', 3000, 1)
end

function spell1_18197(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_18197', 3000, 1)
end

function spell2_18197(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18197', 0, 1)
end

function Sorts_18197(pUnit, Event)
local choix_sorts_18197 = math.random(0, 2)
if choix_sorts_18197 == 0 then
pUnit:RegisterEvent('spell0_18197', 1, 1)
end
if choix_sorts_18197 == 1 then
pUnit:RegisterEvent('spell1_18197', 1, 1)
end
if choix_sorts_18197 == 2 then
pUnit:RegisterEvent('spell2_18197', 1, 1)
end
end

function mob18197_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18197', math.random(1500, 3000), 1)
end

function mob18197_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18197_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18197_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18197, 1, 'mob18197_Action')
RegisterUnitEvent(18197, 2, 'mob18197_Leave')
RegisterUnitEvent(18197, 3, 'mob18197_Kill')
RegisterUnitEvent(18197, 4, 'mob18197_Die')
